/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.core.log;

import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.core.util.StatusPrinter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Debug {

    public static boolean isTest = false;
    final static Logger logger = LoggerFactory.getLogger(Debug.class);

    public static void info(String log) {
        logger.info(log);

    }

    public static void traceException(String mes, Throwable throwable) {
        logger.debug(mes, throwable);
    }

    public static void error(String log) {
        logger.error(log);
    }

    public static void d(String log) {
        logger.debug(log);
    }

    public static void console(String log) {
        System.out.println(log);
    }

    public static void main(String[] args) {
        //        // assume SLF4J is bound to logback in the current environment
        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        // print logback's internal status
        StatusPrinter.print(lc);
        logger.info(System.getProperty("java.class.path"));
        logger.info("Entering application.");
    }
}
